/*
 * @Author: your name
 * @Date: 2021-04-07 15:06:48
 * @LastEditTime: 2021-04-19 21:41:30
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \chronic-back-end\module\pushMod\main.go
 */
package pushMod

import (
	"chronic/module/userMod"

	"github.com/gin-gonic/gin"
)

/*Module 推送模块 */
func Module(app *gin.Engine) {
	module := app.Group("/push")
	module.POST("/onePush", userMod.Allow(userMod.Admin), postOnePush)
	module.GET("/pushes", userMod.Allow(userMod.Patient), getPushes)
	module.GET("/allPushes", userMod.Allow(userMod.Admin), getAllPushes)
	module.DELETE("/admin/push", userMod.Allow(userMod.Admin), adminDeletePush)
	module.GET("/pushesByAuthorId", userMod.Allow(userMod.Admin), getPushesByAuthorId)
	module.GET("pushesBySort", userMod.Allow(userMod.Admin), getPushesBySort)
}
